package mspbots.autotask.data.core.companies;

import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Mono;

/**
 * mspbots.core.sync.autotask.badmessage.AtBadMsgRepository
 *
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 * @date Created by 2020/7/21
 */
@Repository
public interface CompaniesRepository extends R2dbcRepository<Company, Long> {

    /**
     * find entity other id and tenant id
     *
     * @param otherId  other Id
     * @param tenantId tenant id
     * @return account entity
     */
    Mono<Company> findByOtherIdAndTenantId(Long otherId, Long tenantId);
}
